home *** CD-ROM | disk | FTP | other *** search
- Deluxe Pacman Journal - rebuilding the code
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
- Note: This is my programming journal starting from after my hard drive
- crashed on me and I lost all my NEW source code. All this happened
- while I was in the hospital on the edge of death with a temperature of
- over 105 and I could barely breath or walk...
- it was a bad week for me ;)
- ...the NEWEST entry will be at the bottom of this file.
-
- -----------------
- Nov. 27, 2001
- -----------------
- Had alot of clean-up to do!
- I redone the old makefiles and combined them into one makefile for the
- windows build. I deleted the linux, beos etc... makefiles and the perl
- scripts for creating makefiles. I now do all my makefiles by hand. This also
- reduces alot of clutter.
- I had to go over all the old code I had and fix it up so it would run. As
- it was I had been experimenting with using a 640x480x16bit screen and the code
- was really messed up and wouldn't run well at all! I redone it so it was back
- to the old 320x240x8bit mode and basically got rid of any experimental code.
- At this point I had also JUST added in a menu so I got rid of the old text
- display on the title screen and all associated code.
- I deleted the old data file and replaced it with the version .99 one. This
- meant I had to reprogram my newer map format code from memory or the game
- wasn't going to load in the maps. This took a little while to remember. I
- had redone the map code so that the maps were far smaller, each map cell was
- stored as an unsigned char, and the number of pills were stored as an unsigned
- short, but in the game the map cells stored data with values larger than 256,
- this confused me for a while until I remembered that I used temporary storage
- for the map at load time. I loaded the maps from the data file into
- "unsigned char map.." and then copied that data over to the players int map
- structer, converting the data from unsigned char to int as I copied. This
- allowed me to store smaller maps on disk, yet still store values larger than
- 256 in the map data in-game (for things like pickups and tools that appear,
- yet are not stored on disk permanently). Anyhow, I got that done and the maps
- loaded perfectly.
- Next, I had to go over all my code and clean it up so I could read it.
- Somehow all my tabs were all out of place and so the code was very messy
- looking and would be hard to work with as it was. I went over it line by line
- until it was all indented properly and no lines exceeded the screen width
- (so I could print it out neatly as well), which I did!
-
- -----------------
- Nov. 29, 2001
- -----------------
- Been working on fixing a few bugs that I had completely forgotten about.
- When you moved over to grab the fruit or a tool, sometimes it wouldn't
- disapear and you would have to go over it twice to get it, each time making a
- different sound. This error eluded me for quite a while, but I managed to
- come up with a fix. When a random pickup or tool is selected, I set the
- variables "pickup.active = FALSE;" and "tool.active = FALSE;", that ensured
- that when ONE was selected, ONLY one would be available to be picked up. For
- some odd reason (which I still haven't discovered) sometimes after you grabbed
- a pickup (like an apple or something) it wouldn't set it as inactive anymore
- and so when a tool was randomly selected you would get BOTH tool AND pickup
- set as active still and so you would have to grab both. I don't see where
- this happens, I looked over my code carefully and I always set the pickup as
- inactive (pickup.active = FALSE) after it is picked up yet it seems to be
- active at times, so setting both to FALSE before something is picked ensures
- that doesn't happen. Still it bothers me, I need to know where it is that
- pickup.active (or maybe it is tool.active?) doesn't get set to FALSE (or gets
- set to TRUE)? We may never know! :)
- I added in code so I could select "God" mode with F9 (and disable it with
- F10). This was absolutely nessecary because I needed my pacman to stay alive
- long enough to test if the above mentioned bug would re-occur.
- I fixed the TL_DIAMOND code so the diamonds are perfectly centered over
- each tile, they were off center in the old code.
- I went through the datafile and re-organized it a bit so that all the sound
- samples, fonts etc.. were all grouped together.
- I redone the code to use the new fonts. I had to reprogram pacman.c and
- hiscore.c mainly... I still have some work to do in that area, some code needs
- to be fixed so the fonts are properly centered on screen and don't overlap
- etc. The new fonts are 16 in height, the old one was the standard 8. I also
- redone some of the code so it now checks the font size rather than having a
- default value of 8 in it. This makes the code more flexible for future
- expansion and/or change.
-
- -----------------
- Dec. 5, 2001
- -----------------
- Fixed all the text display so that it is properly centered and not
- overlapping other text. Mainly the "PRESS ANY KEY" etc... when you start a
- game. Added back in the "LEVEL 1" etc.. indicator that tells your what level
- number you are on. Fixed the hiscore.c text so it is all properly centered
- and the correct colours etc. I also added in the "1UP", "HI" and "2UP" text
- next to the scores. It actually looks a bit better than what I had finished
- before because the "HI" is now in the correct position, it was a little too
- far away from the score before and it never got fixed.
- Added in cheat keys "D" to force diamonds to appear the next time a tool or
- pickup appears.
- Added in keys 1-5 for selecting EXTRA letters to appear the next time a
- pickup or tool appears. All these cheat keys were nessecary for testing
- purposes.
- A major update was the addition of a tool timer on the right side of the
- screen that counts down the time left on the current tool you are using. This
- was something I had planned when I first started making this game but never
- got around to completing and almost didn't get added until my hard drive
- crashed and I lost all my source code. Now as I rebuild the code I find
- myself taking the time to fix the various problems and adding in these
- features so I don't have to come back and do it over again.
- I will be working on the MENU next, I think I might try something new with
- it and see about using the GUI system alot more effectively with it. I might
- try out a new GUI system that replaces the default system that comes with
- allegro and looks alot nicer, we'll see how that pans out. If it becomes too
- much of a headache I will drop it and just stick with what I had before. I
- also discovered some errors with some of the graphics that I created for the
- game and I may have to redo some of them. The hearts don't fit properly in a
- couple of them. It shouldn't be much to fix it though. I also want to add in
- an actual screen to go along with the applause that one gets when you complete
- all the levels.
-
- -----------------
- Dec. 5-6, 2001
- -----------------
- Started work on the this evening. I think I have improved my code so that it
- is far better than the original code was. It is definately alot more
- organized than it was before. The menu is working very nicely. I added in
- the same menu sound I had before (the PILL sound) only I raised the pitch of
- it a bit to hear what it would sound like and I am pleased with the results.
- I think I'll keep it. I am using the readkey() function to read keyboard
- input rather than key[KEY_UP] style statements so that I can easily add in
- joystick support later on. When I add in joystick support I will simply
- use simulate_keypress() when-ever a joystick is moved, this requires buffered
- input which readkey() can handle nicely and I won't have to add in seperate
- code for the joystick. Once the joystick is moved, it will simulate a
- keypress and then then keyboard routines will handle the input as if a key
- was pressed, kewl huh?! =D When I created a bitmap for the menu I forgot to
- allocate the memory created to the BMP bitmap and crashed my computer, yay!
- It is always the simple errors that get ya! heheh. So far 1 PLAYER, 2 PLAYER
- and QUIT menu selections work. It is shortly after 6am, and I am heading to
- bed now. heheh... I'll finish the menu off tomorrow and then see what else I
- have left to do. Things are coming along ALOT faster than I expected!!! If
- it wasn't for the kind email I got from a fan of this game I don't think I
- would have even started rebuilding it, which would have been a waste as I
- have put ALOT of time into this project... as simple as it seems NOW, it was
- a learning curve for me as I worked on it... anyhow, off to bed!
-
- -----------------
- Dec. 7, 2001
- -----------------
- Okay, I got LOTS done since my last log entry. It is shortly after noon
- and I have ALL of the menu D O N E!!! YAY! I got RID of the window mode
- for the game. Did anyone REALLY use that?? I didn't think so. There were
- some bugs when displaying "PRESS ANY KEY" at the game start screen when in
- windowed mode. This is a fault of Windows and/or the library and I really
- didn't feel like hacking around for a few hours trying to solve a problem
- for a mode nobody probably uses anyhow.
- The "PRESS ANY KEY" part at the beginning of each level looks alot better,
- while trying to fix the above mentioned problem I decided to improve the look
- of it and I really like the result.
- I edited the HELP, CREDITS and ABOUT to reflect changes in the game. The
- HELP section had the largest change. I added info about all the tools and
- what they are all used for etc. I added another name to the CREDITS.
- I was sent in a few levels from someone who liked the game so I added them
- to the game (level 24-27) and gave him credit (thanks).
- I updated the PACE program, it required remarkably little change, the mouse
- pointer needed to be fixed to the colors were correct. I added in new code
- so that the mouse pointer changes to look like whatever line or pill you
- select, looks very kewl! :)
-
- -----------------
- Dec. 10, 2001
- -----------------
- LOTS more done!!! This rebuilding is going alot faster than I ever ever
- ever imagined! :) You just don't realize how far back the old code was and
- how many problems I had to fix (AGAIN!). I am almost glad it happened as I
- have found alot better ways to do alot of things and it is really looking
- good and easier to manage.
- I added in more comments to my source to remind myself (and anyone that
- might see it in the future) what certain sections do.
- I have most of the tools working, it was easier than I thought (the
- result of early planning that I had forgotten about).
- I redone the scoring code and put it in it's own function and let that
- function handle adding points to the players score, mutliplying points do
- to tool usage, calling the floating point function where needed etc. This
- really makes it simpler to redo any of the scoring in the future.
- I played with the idea of floating ALL points when you grab pills, power
- pills etc.. but changed my mind when I tested it out. Things can get
- really cluttered when you are eating pills and several blue ghosts at the
- same time and you have 3-6 points all floating up in the same area of the
- screen.
- I added in code to show a shimmering shield around your pacman when you
- get the shield or GODMODE is enabled in cheat mode.
- I added in code to stop the ghosts from moving when freeze mode is
- active. Only the ghosts currently not dead will be frozen. Dead ghosts
- eyes will continue to move around and when they regenerate at home (hey,
- they can warm up by the fire! =D) they will be able to wander again
- regardless of wether freeze mode is enabled or not.
- I limited the number of points you can get from pickups to 10000. The
- points for pickups (fruit etc..) went up by 500 points per level but got
- too high after you done all the levels once and seeing as how you get a
- free man every 50000 points I think it was reasonable to cap the points
- to 10000 per pickup. I may still raise the freeman score from 50000 up to
- 100000. I am thinking about allowing a free man at the FIRST 50000 and
- then every 100000 after that (after all, you can get an extra man with the
- EXTRA letters and you can gain ALOT of points if you get the present, too
- many extra men and the game ceases to be a challenge).
- I done the question tool, it gives you a random tool or death (or
- nothing if it gives you an EXTRA letter you already have).
- The "DEATH" tool kills you no matter what you have protecting you. I
- consider it like swallowing a suicide pill, no shields can protect you
- against yourself. I know... mean eh? :)
- I recompiled the game using the release version of Allegro v4.0.
- Changed the JUMP tool so that it now jumps you to a random level rather
- than jumping up to five forward or five back, you now get jumped to a
- totally random level ANYWHERE in the game. This could be fun and is easier
- to code than a fixed number forward because if you jump past the end of
- the levels it puts you back at the first level which could bugger up the
- pickup points, and there is no way of knowing for certain if there are
- extra levels on disk that didn't come with the game that the user may
- have created so a random jump anywhere in the game was the safer bet and
- just as fun, plus the risks and benefits of using it are more pronounced!
- The earlier in the game you use it, the better chance of a positive jump
- and the later on in the game you use it, the better the chance for a
- negative jump... makes it more interesting.
- I might change the level format again before I release the game. I want
- to re-organize the lines so they look better in the editor and convert the
- maps that are stored on disk by the editor to a packed file format. This
- should allow me to use larger numbers for maps (good for future expansion)
- and possibly have smaller file sizes for them.
- I have started editing the graphics again, putting all the lines, pills
- etc.. in thier own graphic file to make for more organized source files and
- easier editing and also getting ready for the new map format. This will
- be the final map format as redoing all the graphic files and maps is alot
- of work, probably more work than reprogramming this game's code again! :/
-
- -----------------
- Dec. 11, 2001
- -----------------
- I added in two new tools, the skull and dynamite. The SKULL will kill
- you if you grab it. The question mark can also have this tool so be sure
- you're willing to take a chance when you grab it. I found an excellent image
- for the SKULL tool!!! I shrunk down a digitized image of a real skull, it
- looks great!
- The second tool I added is DYNAMITE, when you grab it, it will kill off
- all ghosts that are BLUE giving you 5000 points per ghost killed. This can
- give you up to 20000 points if you have all four ghosts blue so you might
- want to keep at least one powerpill available as long as possible just in
- case the dynamite appears. With no blue ghosts the dynamite effect is
- useless. When one appears grab a powerpill and then avoid ghosts and
- grab the dynamite for the most points. I drew the dynamite myself. I am
- no artists but I think it looks okay. (hey, if you can do better let me
- know and I'll use your artwork and give you credit in the game for
- ANYTHING you think you can improve upon, all art sent to me MUST be
- free of copyrights though, ie: public domain or I won't use it.)
- I redone the TOOL labels in the datafile. This is nothing that the user
- will notice but it makes it easier to add in new tools to the game, the
- tools are now labeled TOOL000 to TOOL014 (with a NULL TOOLZZZ at the end
- for performing calculations with, ie: TOOLZZZ-TOOL000=the total number of
- tools available, this works no matter where they are in the datafile).
- I still want to re-organize the lines so they look better with the
- editor and so I'll have to also redo the map format slightly, this
- shouldn't be too hard to do, I think I can rename the labels in the data
- file to accomplish this without fiddling around with the artwork and then
- I'll only have to write a simple utility to convert the current maps over
- and restore them back in the datafile.
- I also still have to add in joystick support, an easy task.
- I also want to create alot more levels, at least 50 more, but I would
- prefer to have a total of 100, we'll see how energetic I get. ;)
- I also have to edit some of the line graphics in the game, they have
- some errors that were introduced when a friend of mine redone them. He done
- a nice job but didn't pay attention so certain important details. It
- shouldn't take much effort to redo them... then I can finally release this
- sucker as version 1.0 and start on something new! ;)
- I just updated the docs as well.
-
- -----------------
- Dec. 12, 2001
- -----------------
- I redone the lines for the levels, if you run PACE (the editor) you will
- see a big difference. They are much better laid out and easier to find the
- line type you're looking for. I also redone the level format so the levels
- now consist of unsigned integers rather than unsigned characters. When the
- levels were unsigned characters (per byte stored) you could only store
- values from 0 to 255. Now that they are unsigned integers they should be
- able to hold values from 0 to over 16 million I think (unsigned ints are 4
- bytes in size, that means values over 16million! I'll never use that much!)
- I am also using a packed file format so not only will the levels be able to
- hold an almost unlimited number of values in each map cell, but they are
- actually smaller when saved to disk from PACE, usually around 250bytes (the
- unpacked size is 1269bytes). Not really all that large with hard drives in
- the gigabytes these days but I have noticed a lack of concern amoung
- programmers for file size these days and it all starts to add up after a
- while so I am always trying to save every byte I can. I think it is a good
- habit to get into, regardless of the amount being saved, so long as speed
- and quality aren't sacrificed too much, and they aren't in this case.
- The new map format required me to unpack the levels before storing them
- in the data file (it is packed seperately) and adjust my routines to load
- either map from the hard drive (packed) or from the datafile (unpacked).
- Any files saved with PACE will be packed.
- I wrote a utility called convert5.exe to convert all maps to the new
- format. The new format required map names to be LEVEL001.MAP, LEVEL002.MAP
- etc. rather than LEVEL1.MAP etc... the number MUST be 3 digits long, no more,
- no less or the game will not load them.
- To use convert5, type CONVERT5 LEVEL#.MAP (where # is the level #). Your
- file will be converted and probably be smaller than it was before. You will
- need to rename it to the new format before using it. So if your level is
- say LEVEL19.MAP for example, you would rename it to LEVEL019.MAP.
- I might redo the convert utility to automatically find all maps and
- convert them for you, possibly even renaming them for you or spitting out
- a new map with the new name, it shouldn't be too hard to do, I could use the
- for_each_file() function I guess. I probably will do it now that I think
- about it. It would be a learning experience as I have not used that function
- before and it would make life ALOT easier for people who just want to quickly
- convert thier old levels without alot of hassle. And the less hassle you
- have, the less email I get asking how to do it. :)
- I want to redo the END OF LEVEL flashing screen so it doesn't flash WHITE
- anymore. version .99 had this already done and I forgot about it until I was
- watching my wife play the game and noticed that I had to redo it again. It
- shouldn't be too hard to do and looks nicer than the flashing white, it could
- also prevent a siezure. ;)
- Oh, I renamed the levels in the datafile to LEVEL001, LEVEL002 etc... as
- well. I also renamed the lines to A00LINE01, A00LINE02 to A07LINE19 with
- A99LINEZZ as the end marker. This is more neat looking, I had renamed it
- while I was re-organizing the lines around so they would look better in the
- editor. There are better ways to do this, I know indexes to the datafile
- indexes would be ideal, and then storing the indexes in the map files would
- be far far far easier when converting maps as I would have no need for a map
- converting program because I would only have to redo the indexes in the editor
- and the game to point to the proper graphics, but I want to do this in a
- future version of the game when I start fresh... indexed maps would have been
- alot easier if I had thought of that in the first place though. Live and
- learn I guess. Right now the maps store the actual datafile number of the
- graphic to use (which meant that all my graphics had to be at the beginning
- of the datafile and not go over 255 when the map format was using unsigned
- chars, indexes would have been alot better in that case as well).
- I reprogrammed the game so that when pickups (fruits etc...) appear, they
- appear randomly. There is no longer a different pickup for each level. I
- felt it looked nicer to have different items appearing to pickup rather than
- the same one for the whole level. This also solved a new bug that popped up
- with the pickup display routine.
- I reprogrammed the game so the screens don't fade out anymore. This
- caused some wierd problems on some computers (my other computer had problems
- with the fading, it has a Voodoo 3-2000 video card in it). I put the
- background image back in the title screen so when you switch from the title
- screen to the main menu you have a common background behind both of them
- that looks better when switching between the two.
- Lets see, I just have to add in the joystick support, edit some of the
- line graphics and maybe create a few new levels and I am finished (unless
- I am crazy enough to think of something else I want to add!).
-
- -----------------
- Dec. 13, 2001
- -----------------
- I redone the present tool graphic. The old one was very plain looking.
- The new one looks a little better. I am no artist but it's better than
- nothing. ;)
- I fixed the errors that were in some of the line graphics, errors
- introduced by a well meaning friend to redone the graphics (and done a nice
- job), except there were a few problems around the areas where the hearts
- appear, some of the boxed areas weren't large enough for the hearts and the
- hearts would overlap the lines a bit, this is now all fixed.
-
- -----------------
- Dec. 17, 2001
- -----------------
- Between yesterday and today I woked on adding in joystick support. I also
- moved all the input functions into thier own module called input.c. All
- keyboard and joystick main functions are in there now. I also had to move a
- couple global variables over to input.c and I redone a few pacman.c global
- variables so that they could be made external in pacman.h so input.c could
- use them. This also cleaned up pacman.c near the beginning of it a bit as a
- side effect.
- I had a small problem with the joystick routines in the continue() function
- (located in input.c), I had to add in code to wait until the user released the
- joystick button before the function continued on, I ran into problems when I
- forgot to poll the joystick while checking to see if the button was relased,
- as a result I ended up in an infinite loop resulting from the joystick button
- variable not being updated because the joystick wasn't being polled. It was
- one of the stupid little mistakes that takes you a while to figure out because
- it would crash the system and I had to reset everytime. Hehehe... live and
- learn I always say. ;)
- I believe I have done everything that I really wanted to do with this. I
- might package this up and release it as v1.0b and MAYBE make any refinements
- later on I wish and release it as the final non-beta release.
- Ooops, found a couple small errors with the level editor (PACE). When you
- loaded a new level in the line graphics wouldn't change to the set the level
- uses and things would be a little screwed up. The editor now switches to the
- line set the level uses and up dates the screen.
- When you loaded a level or switched to a new line set, the mouse pointer
- would still have the last piece you selected, even if it was not the current
- line set. If you clicked NEW the pointer would have nothing, fixed.
-
- -----------------
- Dec. 25, 2001
- -----------------
- Got an email from Robson today, he mentioned the game speed in hard wasn't
- fast enough and the keyboard input wasn't responding. I tweeked the speed
- so that hard is now faster, easy is now slower (great for young children).
- I have an idea for improving input, I'll check for keyboard input, if
- there is any, I'll ignore any joystick input. This will HOPEFULLY correct
- the problem.... although I still think it has alot to do with Windows
- joystick calibration. I am tempted to remove joystick routines all together
- as I don't currently know of ANYONE that uses a joystick with this.
- I added in code so you can turn the music and sound on and off as well as
- selecting keyboard only or joystick (& keyboard). The keyboard will still
- work in joystick mode, but you may have problems using the keyboard if your
- joystick isn't calibrated properly (and I am NOT adding in calibration code
- when windows has calibration built in). If you select KEYBOARD from the
- options menu the game will not check for joystick input at all.
- The code for music and sound toggling is just as it says, it toggles
- music and sound on/off. This could be handy for late night sessions when
- you want to play but not wake anyone or if you are having sound problems but
- still wish to play.
-
- -----------------
- Dec. 28, 2001
- -----------------
- Edited the input system a bit so if you press more than one cursor key at
- a time the game will most likely respond the way you wish it to and the pacman
- will be easier to control. It was a minor fix but some people seem to really
- notice the difference so here ya go! :)
- Fixed the pause button which wasn't working.
- Fixed the GAME OVER graphic which wasn't appearing when all your pacmen
- died.
- Added the version number to the title screen.
- Fixed a few other minor cosmetic items and cleaned up the code a bit.
-
- -----------------
- Jan. 13, 2002
- -----------------
- Minor changes in all my source code. I changed all the function names so
- that all the functions that didn't require any variables ie: void function()
- were renamed to: void function(void). I learned there is a different meaning
- in C than C++ for such functions. A function in C with () doesn't nessecarily
- mean void, it could mean multiple variables in no particular order or whatever
- depending upon the compiler. I wanted to be certain so I put void in all
- the functions to prevent any confusion or problems. I also re-compressed all
- my executables and the allegro dll with the latest version of UPX (v1.20) for
- windows. This reduces the size quite a bit for the DLL whose original size
- was 800K and is now 400K!! It also reduces the executables size a little.
- This may not make much sense in the age of 40GIG hard drives and I wasn't
- going to bother until someone mentioned to me in an email that it might would
- be helpful to those with slower connections, the smaller file sizes would mean
- less time waiting for the download to complete, and that made sense so I
- reduced the size. It also helps it fit on a floppy disk quite nicely and
- with limited space allowed for me on my website, every byte counts. I renamed
- the version number to v1.02b just for the actual filename and description.
- If you run the game it will still say v1.02, the game itself is exactly the
- same, only a little smaller in size. If you have v1.02 there is no need for
- v1.02b, unless you want to send it to friends.
-
- -----------------
- Jan. 28, 2002
- -----------------
- Done some cosmetic changes to the game. Change the title image and the
- hiscore background, added the fancy little block "fade-in" routine I used for
- the hiscore to the title screen, main menu and the first time you start
- playing just for looks.
-
- -----------------
- Apr. 27, 2002
- -----------------
- Recompiled the source code so that it is a true, 100% Windows compile,
- rather than a Windows console program (or a Windows DOS mode program, but
- not actually a DOS program... <shrug>). Anyhow, you'll notice right away
- that there isn't a small DOS (windows console) style window when the game
- starts, there is just the full screen window. This should improve stability
- and allow the program to be run on newer versions of Windows hopefully. If
- this runs on Windows XP, please let me know, I don't run that version and
- would like to know. The new version of this game has only a slight version
- number change, v1.03w instead of 1.03 to indicate it is 100% Windows compile.
-
- -----------------
- Apr. 29, 2002
- -----------------
- A friend (Kirk Wilson) tested the new compile with Windows XP and it ran!
- Only one little problem... portions of the video would disapear. This has
- NOTHING to do with *MY* programming but WINDOWS XP handles the display
- differently and doesn't like to keep the video contents intact. I used a
- dirty rectangle system of updating the screen which only updates portions
- of the screen that actually CHANGE, unfortunately I had to remove that and
- go with a straight double buffering system where the entire screen gets
- updated every frame. This is a much slower method, but my system still
- gets around 192 Frames per second which is respectable, but REALLY slow
- systems might hurt, I don't know, I honestly don't think anyone has so slow
- a computer that they won't be able to play my game, especially if they're
- using Windows XP anyhow so all should be okay. If you have any problems
- please email me and let me know.
-
- -----------------
- Jun. 21, 2002
- -----------------
- Just got done with version 1.04. I had a few requests to add a Windowed
- mode back in the game so I have done that. I am also using a newer version
- of the NSIS installer (v2.0a0) which is a little nicer and I added in CRC
- checking to the installer so when you first run the installer it will check
- itself to make sure it hasn't been altered by a virus or whatever by
- calculating it's CRC (checksum code) and comparing it with the code that was
- stored in the installer when I packaged everything up. If these don't match
- the installer should warn you and fail to install. If this happens to you
- DELETE THE GAME and download it again, or if the place you got it from has
- an altered version of the installer with this error, inform them, do a virus
- check on the file etc. Download the game from my own personal website if
- you must, it will always be virus free.
- I also enabled the close button in windowed mode so that you can shut down
- the game normally by clicking the close button. This has the same effect as
- select QUIT from the menu or pressing ESCAPE so don't worry.
- I changed the icons for the installer to better reflect the game, the llama
- that you normally see has been replaced (eaten? ;)) by a pacman.
-
- I uploaded version 1.04 to my website and gamedev.net and started work on
- v1.05. I fixed a problem in cheat mode and with GODMODE enabled, if you
- grabbed the skull yo died. This no longer happens. The dynamite now blows
- up ALL the ghosts (except the "dead" ones that only have eyes left) rather
- than just the blue ones, my wife wanted it this way, so she gets it ;) It is
- alot more fun watching them all "blow'd up real good" he he he... plus you
- get ALOT more points if all 5 ghosts are alive, 5000 per ghost.
- Well, the close button works everywhere but when in a dialog, what
- a pain in the butt they are. I knew I should have designed my own and avoided
- allegro's GUI, it is a royal pain. Now I have a reason to redo the menu
- system, but I am not sure if I want to do a complete overhaul of this game
- or save it for version 2. I want the menu system to be alot better with
- more graphics, especially in the HELP section where I want actual images
- of the various tools you can pick up with descriptions next to them. This
- shouldn't be hard to do and will be infinately better looking than the ugly
- allegro GUI system.
- Fixed the problem with the end of level flashing properly in windowed mode!
- The installer will now add links to ALL the text files that are installed
- in your game directory, including this Journal, Cheat Codes (added new this
- version so you know all the keys) and the Map file format document in case
- anyone feels like creating thier own Deluxe Pacman map editor or perhaps a
- random map generator? (I doubt it but you never know).
-
- -----------------
- Jul. 9, 2002
- -----------------
- (actually several days, I just forgot to update this, so sit back and
- relax a little, this is going to be a long one! ;))
- Okay... I done ALOT of changes... the game now runs at 640x480 instead
- of 320x240. It LOOKS basically the same still. You will only really notice
- it when you look at the credits, help etc... which are half the size and when
- you look at the LEVEL box at the beginning of each level that tells you which
- level you are on, it is smaller, also the tiny numbers that float up are about
- the same size, but I am using a more detailed font so they should look a bit
- better. Also the hiscore screen has smaller letters. I can change this later
- on in a different version. WHY change resolution when it all looks the same?
- Well, for one when you run the game in windowed mode the window is now double
- the size. Also, 640x480 is a standard resolution, ALL cards support it
- guaranteed (or it is time to upgrade, they invented SVGA now! LOL). Another
- reason is I DO plan on changing to ALL new graphics, high res, nicer looking
- etc... maybe even 16bit graphics, so long as it doesn't effect the games
- performance much.
- Another MAJOR change was that I switched from double buffering (which I had
- to go back to, due to some Windows XP problems with dirty rectangles which is
- ultra fast!!!) to page flipping. Dirty rectangles is STILL faster, and I can
- still use them with page flipping for probably some pretty fantastic frame
- rates, but page flipping takes place 100% in video memory, which means the
- game can use all video memory. This increases the minimum video ram by
- about 4 times (double the resolution and double the video screens) but
- currently it only adds up to about 614K of video memory, plus I am also
- blitting much of my graphics to video memory to help speed things up so
- you can probably count on requiring at least 1MEG of video memory, which
- isn't all that much, but you want an accelerator card if you have any
- problems with speed. Without an accelerator it could slow down a tad
- although page flipping is still faster than double buffering... I'll have
- to test all this out on a non-accelerated system. Remember though, a higher
- video memory requirement means a lower system memory requirement, if it is in
- video memory it doesn't need to be in system memory (well, currently it is
- in BOTH, but that will change, I am working on it...). These days I don't
- think memory is much of a problem for most folks. I may have to add in a
- system for people without accelerator cards, I don't know how many out there
- don't own one, I can't see anyone NOT owning one, but... you never know.
- I fixed a LONG existing bug in the game, a minor one really that you
- probably hardly noticed... or did you? Anyhow, if you grabbed a powerpill
- before and you ate the red ghost (or possibly another), and the eyes of the
- red ghost made it home while the other ghosts were still blue, the background
- sound you hear when they are scared stops and returns to the normal sound
- even though some are still scared (blue). This has been fixed anyhow... now
- if they are ALL eyes (eaten...) then sometimes the scared sound goes on a bit
- longer, but that is minor... I may fix that soon as well, but I wanted to get
- this entry updated as I missed alot of days I was working on this bug fixing
- and forgot to update the journal. I was having a problem with an invalid page
- fault which means that mostly likely I was trying to blit a bitmap that didn't
- exist, or a non-bitmap. I had just changed the ghosts to video memory so
- in all likelyhood it was a pointer to one of the ghost images. This gets
- complex as I have quite a few variables referring to them. Well, it turned
- out that I had inadvertantly deleted a line that I didn't think I would need
- again that would switch the current ghost image back to the first image in the
- ghost's animation after he was scared. I had a different system I tried out
- that turned out to be a bigger headache and I figured out a better system.
- Anyhow, I didn't put the line back in (dumb, I should have just commented it
- out!), but I WAS smart enough to make backups of all my code before changing
- anything. It took me 2 days to find that bug! MANY MANY resets and alot less
- hair later it was fixed and I could finish up the rest of the code, like the
- menus and hiscore screens which needed to be changed because they wrote
- directly to the SCREEN in allegro and seeing as how I was using page flipping
- this had to change because the "screen" is always in a different memory
- location, one of two locations (the two pages). My solution was to force the
- game to switch to the FIRST screen and also to DRAW on that screen, basically
- turning off page flipping for the hiscore and menu screens and then when
- it drew to the current page, (screen) they drew the images on the page you
- were looking at, rather than a page in the background like you normally would
- in page flipping (in page flipping you draw on an offscreen video page, then
- you tell the video card to switch to that memory location so it becomes what
- you see on the screen and you draw on the other offscreen video page... hence
- you flip back and forth and it is seemless, no blitting required which makes
- it alot faster. Although with hardware acceleration you get accelerated blits
- and clears so all my other graphic data is in video memory to take advantage
- of hardware acceleration. The ghost images and pacman images don't really
- make a difference, mainly the map data like lines and pills. The pacman image
- is in regular memory, it needs to be rotated and that is VERY VERY SLOW in
- video memory, also the pickups and tools are all in system memory where
- I'll probably leave them, they are too small to make any difference.
- I added a -nosound switch to the command line to you can turn off the sound
- and music before the game starts, good for those late night programming
- sessions when I don't want to wake my wife. :)
- I added more "CHEAT" codes to help me program the game mainly. Now if you
- press "F" you force the next tool to pop up to be a FREEZE. The ghosts eyes
- now STOP moving and just stare blankly at YOU (the player!) while they are
- frozen, it looks kewl I think. :) If you press F1-F4 you will instantly turn
- one of the ghosts BLUE (scared, depending on the F-key pressed), I needed this
- while fixing that scared sound bug.
- I made the shield (circle around pacman) a little larger, it looks better I
- think.
- The scared sound now stops when all the ghosts are dead. I also added in
- a new feature, the scared sound increases in pitch as you eat the pills. It
- works on a percentage bases, the less pills there are, the higher the pitch
- up to a maximum of 2 times the normal pitch. It sounds purdy kewl I think.
- There is a minor bug that still exists. Once in a while, when the moon
- is blue, on friday the 13th when you grab a tool it will last 2-3 times longer
- than it should! This can give you a major advantage and I want to fix this
- ASAP, but I also want to get another version out, so I figure you won't mind
- getting this little bonus bug for a little while until I figure out what is
- causing it to behave in that way.
-
- -----------------
- Jul. 10, 2002
- -----------------
- Okay, I fixed the problem with the tool and pickup timers so now they
- should appear on time (no more long delays) and when you get certain tools
- that last a specific amount of time (like the freeze for example) they won't
- last 2-3 times longer. It was a minor bug to do with the retrace_count I use
- to time everything in the game and sometimes when I test it with a divide %
- it skips because it might be 1 off. Now I do the division and test to see
- if it is within 10 numbers from the interval I wanted so the MOST it will
- go over or under the time would be 1/6 of a second, more in likely it wouldn't
- be more than 1/60 of a second, which wouldn't even be perceivable by a person
- playing the game.
- Now that I have squashed that bug I want to work on all new hi-res
- graphics. The current graphics were made for 320x240 resolution, now that I
- am using 640x480 I can double the size of the bitmaps used for the map lines,
- pills, pacman and ghosts and reduce the blockiness with much more detail and
- it should look very nice. I might also switch the game to 16bit so I can use
- more colour in the game. I will be using 3D rendering software (Truespace 1
- which is FREE on the internet now!) to render the pills, pacman, ghosts,
- lines etc... it should look good! Although creating Pacman and especially
- ghosts in 3D is alot of work! the pacman is almost done, the ghosts will be a
- bitch. The pills will be a breeze, simply render a 3D sphere with maybe some
- coloured lighting on them and they should look very nice.
- Anyhow, off to work.... oh, the game shut down on my wife for some unknown
- reason. She was on level 8 and a present apeared, when she grabbed it, the
- game just shut down very fast with no errors. I suspect it was something
- running in Windows that caused this as it doesn't make sense that the game
- would do this, BUT I will be keeping my eyes open for any problems that might
- occur and swatting any bugs. Let me know if you run into ANYTHING as this is
- the ONLY bug that MIGHT be left, although I can't imagine it being anything
- to do with the game, but you never know... it MAY have had something to do
- with the number of sounds playing at once, she has a sound blaster 16 in her
- system, but the game never plays that many I don't think... hmmm...
- Added in a new cheat code to force the next tool to be a PRESENT, this was
- so I could test for that bug, see the cheat text file for more info.
-
- -----------------
- Aug. 8, 2002
- -----------------
- I found out why the game was shutting down. There is a few bugs with the
- Allegro library that I have to work around. For some unknown reason the game
- has a HUGE memory leak when I used page flipping and would eventually crash
- on you, the less memory you have, the sooner it would crash. I switched to
- dirty rectangles again and the library has a bug when you use it with Windows
- XP and dirty rectangles. Windows XP likes to clear the screen on you for no
- particular reason and this really screws up the game with dirty rectangles
- because the game only updates the areas of the screen that actually change.
- I JUST got an email from a fellow programmer who came up with a solution
- TODAY and I implemented it right away. It is basicaly a hack to avoid using
- certain areas of video memory, but it works. It uses extra memory that isn't
- needed, but this shouldn't be a problem unless you have a REALLY OLD video
- card with a meg of memory or less.
- The game now runs at 640x480. I put together a special version to release
- right away so people can play it without any bugs, it is 8bit and the
- graphics have been stretched to fit the screen. The main reason for changing
- to the higher resolution is because some video cards don't support modex
- resolutions like 320x240. But ALL video cards support 640x480 and since that
- happens to be exactly double the size, I simply doubled the size of the
- current graphics. I am working on all new hi-res graphics and maybe 16bit,
- but 16bit is slower, I may stick to 8bit which still looks very nice. The
- newer graphics are looking good and I will release them soon, you should
- only have to download the new datafile when they are done instead of the
- whole game as the current code will work with the newer graphics. The
- title screen is new, it has been dithered from 16bit to 8 bit and you can
- tell. I will be changing it to either 16bit only, or 8bit but with it's
- own palette so it will look like 16bit.
- Redone the title screen some more so now it has it's own palette. This
- means I can still have an 8bit title screen, but now it has the entire
- palette for the screen which makes for a much nicer looking screen. Right
- now it looks just as good as the 16bit version. I am going to redo the
- menu the same way, I want it to have it's own palette which will mean more
- colourful menu, with a 16bit "look" to it but in 8bit. This will also free
- up more of the actual GAME palette used when you are playing for more colours
- used for the actual game and NONE needed in the main palette for the title
- screen or the menus which will end up with a 16bit LOOK with an 8bit palette
- and greater speed than 16bit. Even the game AGE OF EMPIRES is 8bit! They
- just use a very nice pallete for the game, and I bet seperate palettes for
- the menus etc.
- Oh, the level editor ISN'T included with this version because I have not
- redone it yet to use the larger graphics. You can use an older editor from
- version 1.03 or something (with the OLDER datafile, just put PACE and the
- datafile from that version of the game in thier OWN seperate directory,
- DO NOT OVERWRITE THE NEWER DATAFILE) and the levels it creates can still be
- used with the newer game. I will redo the level editor in the days to come,
- I am not sure how I want to redo it though... but I'll think of something.
-
- -----------------
- Sep. 5, 2002
- -----------------
- More bug fixes, still due to library bugs and not my code, but I managed
- to implement more fixes to help work around the problem. The OPTIONS menu
- now has a new feature called "DIRTY" which allows you to toggle dirty
- rectangles on or off. Dirty rectangles greatly speed up the game by only
- updating the areas of the screen that actually change. The only problem is
- that with WindowsXP (and possibly other NT based versions of Windows) they
- will suddenly blank the screen on you and the game doesn't update the entire
- screen. The game disables dirty rectangles on WindowsNT, 2000 and XP and
- enables it on all other versions of Windows. You can change wether or not
- it is enabled in the options menu to force it on or off if you wish.
- I created a special title screen for the Gamedev.net version of the game
- with thier logo on the title screen. I figure it's the least I can do
- seeing as how they host my game for free.
- The last version (v1.30) had a problem with the menu. The technique I
- used to get around the blanking bug ended up screwing up my menus so they
- were hidden when you tried to use them. This is fixed now.
- I noticed the music seems to be muffled on me. I think this is because
- of old SB-Live! drivers, I will update them to see if it fixes the problem,
- I seem to remember it fixing it before. Let me know if anyone else has this
- problem.
-
- -----------------
- Oct. 15, 2002
- -----------------
- HAPPY DAY!!! I am so pleased today I cannot describe it! :) The bug
- that has plagued this game and the game library that I use has been FIXED!
- MANY thanks to all the folks that work very hard on the Allegro library,
- these guys don't get paid to do this, they just love to program and were
- a huge help. The bug that caused this game's screen to suddenly go blank
- when run under Windows XP has been fixed and now runs smoothly for ALL
- versions of Windows! Many thanks especially to Eric, I mention him and
- another guy in the games credits, please take a moment to read though
- them.
- I am releasing v1.32 of this game and I MIGHT just call it quits for
- a while with THIS game anyhow. I WILL do a major update for it in the
- future with all new graphics but I just want to give this bug free, working
- version of the game a chance to get around and people to enjoy it
- while I work on another project. I might take some time and update the
- level editor for this for v1.33 and release it ASAP, but other than that
- I'll put any other game updates on hold for now as it is running smoothly
- and I need a break from it. heheh :)
- OH yeah, one last SMALL bug I fixed, if you selected -nosound as a
- command line option when you ran the game, it would STILL try to
- initialize your sound before it played! DUH... this wasn't a problem
- as it would initialize it but wouldn't actually play anything, but IS
- a problem if you don't have a sound card installed on your system! The
- game would get a critical error trying to initialize the sound card and
- you couldn't play it! hehehe... a small oversight. OH, if you play the
- game with the -nosound option enabled at the command prompt, that you
- can't re-enable the music within the game without risking a crash.
- Actually, I'm not sure what would happen, perhaps nothing. The sound
- card is NEVER initialized if you use -nosound command line option so
- re-enabling music (or sound!) from the options menu will cause the game
- to try and play them again, but with no sound card... could mean *POOF*.
- You have been warned. ;) (I'll probably add in a protection for this
- in v1.33 as well, but for now just use common sense).
-
- -----------------
- Dec. 5, 2002
- -----------------
- I just got done redoing the level format slightly. The new level format
- is version 6, I had made a slight error when I originally coded the level
- loading and saving routines in. The error is a minor one that probably would
- never have caused any problems but I didn't want to take any chances so I
- fixed it now and converted all the old levels. It took a while, but it
- is better off this way. The code is corrected now with no errors, the levels
- will no longer be packed when you save them to disk, they will be 1K larger
- in size, this was nessecary because in order to add new levels to the data
- file they have to be uncompressed, it was easier to have them uncompressed
- in the first place rather than go through the hassle of decompressing
- them etc... when the file size is so minor, most people have a minimum of
- 4K block size for thier hard drive so the old size of under 1K and the new
- size of over 1.24K will make no difference in how much drive space it will
- take, either way it would occupy 4K of space minimum. When the levels are
- loaded into the datafile, the datafile compresses them so there is no loss
- in space at all in any game I release, only on levels people create.
- I still want to add more features into the level format like individual
- level names, pacman starting position, ghost starting positions, ghost home
- entrance etc... but I'll save that for the future.
- Next thing I will do is create a conversion program for anyone who has
- packed levels they want to keep to convert them to the new format. It
- should be pretty easy to implement. (famous last words eh?)
-
- -----------------
- Jan. 8, 2003
- -----------------
- Another new year, and I am still programming this thing. I think my
- tombstone will read "here lies Pacman" or "the ghosts finally got him" ;)
- Anyhow, thanks to "Gary" for reporting an obscure little bug with the
- jump tool! I made a small programming mistake and as a result the random
- jump tool would pick a level from 0 to 27 instead of 1 to 28 (other
- programmers will recognize this mistake rand()%28 ;) You have to remember
- to add a 1 after that or it picks from 28 random numbers, but you have
- to remember computers don't count from 1, they start at 0, at least in C
- they do and so it would pick a value from 0 to 27 (which is 28 numbers in
- all) so you had a 1 in 28 chance of getting level 0, which didn't exist and
- do to some other oversights it wouldn't pick up that the level wasn't loaded
- and whammo... crash. All fixed anyhow, it had the potential to lock up your
- computer under Win98, it was a rare bug and you would have to play the game
- ALOT to find it. (I guess Gary is a fan ;)).
- IN order to find the bug I had to implement a cheat key to force the next
- pickup/tool to be the JUMP, press "J" in cheat mode to get it.
- I also had a comment from one person that found the shaded numbers made it
- difficult to tell a 9 from a 0 so I added an option to turn off shaded
- numbers. If you turn them off you still get coloured numbers, just no
- shading and they appear a bit brighter. It actually doesn't look too bad.
- Anyhow, for those of you who prefer them unshaded, you now have that option.
- (see, if you have a feature you want, just tell me! heheh)
- I also worked on finishing the graphics some more after taking a break
- from editing them. Trust me, editing the graphics takes more time than
- programming the game! And it doesn't help that I am no artist. I'll try
- and finish them up as soon as possible as I really need to get the next
- version out there with the bug fix. In the meantime I will upload what I
- have completed so far to the website.
- I removed the DIRY ON/OFF option, it was left over from the buggy WinXP
- days, that bug was fixed (and I no longer use WinXP, I went back to good old
- Win98se) so I no longer needed that option, it was replaced by the Shaded
- Text option.
-
- -----------------
- Mar. 22, 2003
- -----------------
- I modified Allegro's Setup utility for use with the game so that people
- who have problems with audio MIGHT be able to fix it with this. There are
- no guarantees though, but it does allow you to select which audio driver
- you wish to use under Windows. The MIDI and other items aren't used in
- Deluxe Pacman, only the digital driver will effect the game at all, I am
- just too lazy to program out the things that aren't needed. ;) I am
- throwing setup in to help a few people who have had problems (mostly
- because of built in, onboard sound which I don't recomend to anyone, buy a seperate
- sound card, I highly recommend Creative SoundBlaster sound cards, I use a
- SBLive! Value, which is pretty cheap but with really nice quality sound and
- it works.)
-
- -----------------
- May. 25, 2003
- -----------------
- I finished redoing the line graphics so now they are now hi-res 16bit
- graphics rather than just resized 8bit graphics. I also redone the Pacman
- character graphics so he looks totally different than before. The Pacman
- should be the most noticable difference, he is now all new, hi-res 16bit,
- redone from scratch. Now I'm wishing I had redone the ghosts the same way,
- I still might, but first I want to get all the pickups and tools redone to
- new hi-res 16bit graphics. I also need to redo some of the coloured text,
- it is currently still 8bit, low-res, I need to create larger, hi-res
- 16bit versions to get rid of the blockiness of it and just plain look
- better. I will keep the low res text for smaller text displays (like
- the opening "get ready player one" stuff looks nice with the smaller
- text), but the scores and the large text on the high score screen doesn't
- look good at all.
- Once I am done ALL the graphics, I will start on possibly adding in the
- GUN (due to popular demand... 2 or 3 people actually requested it :)) and
- I MIGHT add in the EXTRA bonus screens, not sure... or I may just save it
- all for version 2 of the game to avoiding hacking away at old code (and
- some of the code in this game is VERY old! Just ask me for it and I will
- you the source for v1.32 of the game. ;))
- I added in a new level, LEVEL029 is now in the game using one of the new
- line graphic sets. I plan on taking an entire day and doing nothing but
- creating levels. I would like to get up to 100 levels, and I think I can
- get there in a day with some work (I said that before didn't I?)
- I'll probably start doing more work on this game again, it has been a
- while since I done a large amount of work on it.
-
- ---------------------
- Friday, Jun. 13, 2003
- ---------------------
- - 1:00am
- Friday the 13th... <Bart voice>are we scared yet? Anyhow, I got alot done since my
- last entry. I just got done totally changing the fonts for the game to new
- hi resolution fonts. I used anti-aliasing on the fonts to reduce the jaggy
- edges and blockiness of the letters. I also created three different sizes
- of fonts, small, large and huge. I done this to avoid stretching fonts to
- make them larger as this makes them too blocky looking (you could really see
- this on the high score screen). Now the high score screen (now renamed the
- "HALL OF FAME") uses HUGE fonts for the large letters and a large font for
- the scores and names (large font is used on the game screen as well). The
- small font is used for the credits, about etc. I have also added about 10
- new levels of my own, plus someone who likes the game has sent me about 20
- levels, so look forward to at least 30 new levels, plus I have at least 36
- more levels beyond these already designed on paper, just not created yet.
- So 66 NEW levels, plus the 29 that already exist makes it about 96 levels,
- and I will make up whatever number is required to make an even 100 which
- has been my goal all along. I have many more plans that I am working on
- adding to the game in the next couple of months.
-
- - 2:10pm
- Got alot more done. I managed to fix two bugs, one allowed you to enter
- the ghosts home, I fixed it so you can't enter into thier home no matter
- which direction you come from (the way it should have been from the start!)
- There was alsoa a nasty bug that on rare occasions, if you were on level
- 29 and you grabbed the jump, it could crash on you. This has been fixed,
- what I did was when jump would randomly select a level, if it happened to
- select level 28, the game would then end level 29 and before it jumped, it
- would hit some code that would increment the level (as if you just properly
- ended the level) and so your new level would end up at the same level, this
- caused some problems in the way the game was coded and *whammo* crash time.
- Anyhow, it was fixed and won't happen again.
- I also fixed a bug with the high score routines where they wouldn't
- properly load the high scores. Nobody ever seen this bug because it was
- introduced in the last version and caught before I released it. I had
- accidentally deleted a routine to set the password to "NULL" before saving
- and loading the high scores. The functions I use to save and load high
- scores are effected by the password function... oops. Just glad it was
- fixed before I released it.
- Anyhow, this is version 1.40 now as there have been some major changes
- to the game. I am going to upload this to my website as an official release
- due to the fact that it fixes a few important bugs and is to the point where
- most of the graphic work has been finished and so looks purdy good. Any
- old versions should be completely uninstalled and this should be installed
- fresh. The reason being is that it no longer relies on a DLL as with other
- versions, the library is now statically linked (part of the program itself)
- for reasons I won't get into here. Also, the hiscore names are now limited
- to 19 characters long rather than 20, if you have a hiscore file with names
- 19 characters or less than you can still use it. Otherwise you'll have to
- delete it or manually shorten the names before running this version with it.
-
- -----------------------
- Thursday, Jun. 19, 2003
- -----------------------
- - 4:00PM
- Done some minor changes in the pacman and pace code to bring it up
- to date with newer versions of Allegro.
-